package com.lemon.components.video.enums;

/**
 * 
 * @author jlcon
 * <a href="https://www.cnblogs.com/lidabo/p/7419393.html">level 说明</a>
 */
public enum H264LevelEnum {

	L1("1", "1"),
	L1b("1b", "1b"),
	L1_1("1.1", "1.1"),
	L1_2("1.2", "1.2"),
	L1_3("1.3", "1.3"),
	L2("2", "2"),
	L2_1("2.1", "2.1"),
	L2_2("2.2", "2.2"),
	L3("3", "3"),
	L3_1("3.1", "3.1"),
	L3_2("3.2", "3.2"),
	L4("4", "4"),
	L4_1("4.1", "4.1"),
	L4_2("4.2", "4.2"),
	L5("5", "5"),
	L5_1("5.1", "5.1");

	private String code;
	private String message;

	public static H264LevelEnum getEnumByMessage(String message) {
		if (message == null)
			return null;
		for (H264LevelEnum _enum : values()) {
			if (_enum.getMessage().equalsIgnoreCase(message)) {
				return _enum;
			}
		}
		return null;
	}

	/**
	 * 获取全部枚举
	 * 
	 * @return List<H264LevelEnum>
	 */
	public static java.util.List<H264LevelEnum> getAllEnum() {
		java.util.List<H264LevelEnum> list = new java.util.ArrayList<H264LevelEnum>(values().length);
		for (H264LevelEnum _enum : values()) {
			list.add(_enum);
		}
		return list;
	}

	/**
	 * 获取全部枚举值
	 * 
	 * @return List<String>
	 */
	public static java.util.List<String> getAllEnumCode() {
		java.util.List<String> list = new java.util.ArrayList<String>(values().length);
		for (H264LevelEnum _enum : values()) {
			list.add(_enum.getCode());
		}
		return list;
	}

	private H264LevelEnum(String code, String message) {
		this.code = code;
		this.message = message;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
